/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.universityUnits;

import java.util.Calendar;
import java.util.Date;
import model.Collection;
import model.SimpleCollection;
import model.entitys.Named;
import model.staff.Person;

/**
 *
 * @author Slayer
 */
public class Event extends Named{
    private Collection<Person> organizers;
    private Collection<Person> participants;
    private Date start;
    
    public Event(String name) {
        super(name);
        
        organizers = new SimpleCollection<Person>();
        participants = new SimpleCollection<Person>();
        start = Calendar.getInstance().getTime();
    }
    
    public void addOrganizer(Person person) {
        organizers.add(person);
    }
    
    public void addParticipant(Person person) {
        participants.add(person);
    }
    
    public void addParticipants(GroupInterface group) {
        for (int index = 0; index < group.size(); index++) {
            participants.add(group.get(index));
        }
    }

    public Date getStartTime() {
        return start;
    }

    public void setStartTime(Date start) {
        this.start = start;
    }

    @Override
    public String toString() {
        return "Event{" + '}';
    }
}
